<template>
	<view class="classLayout pageBg">
		<custom-nav-bar title="分类"></custom-nav-bar>
		<view class="classify">
			<theme-item v-for="item in classifyList" :key="item._id" :item="item"></theme-item>
		</view>
	</view>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import { ApiGetClassify } from '@/api/apis.js'
const classifyList = ref([])
const getClassifyList = async () => {
	// 获取分类列表
	const res = await ApiGetClassify({pageSize:15})
	classifyList.value = res.data
	
}
onMounted(() => {
	getClassifyList()
})
</script>

<style lang="scss">
.classify {
	display: grid;
	padding: 30rpx;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	gap: 15rpx;
}
</style>